<%-- 
    Document   : editaCliente
    Created on : Nov 12, 2011, 7:56:13 PM
    Author     : Jun
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <body><div id="container"><div id="content">
        <%@include file="topo.jsp" %>
        <%@ page import="br.objetos.*, java.util.*" %>
         <%
            ClienteMetodos c = new ClienteMetodos();
            if (request.getParameter("id") != null) {
                c.buscarClienteId(request.getParameter("id"));
        
            }
            if (request.getParameter("insertedClienteSalvo") != null) {
                c = (ClienteMetodos)session.getAttribute("clienteSalvo");
        
            }
        %>
        <table border="0" cellspacing="5" cellpadding="5" width="100%">
            <tr>
                <th>
                    <%@include file="abalateral.jsp" %>
                    
                </th>
            </tr><tr>
                <th align="left">
                    <h1>Edição de Cliente</h1>
                     
                     <form action="editaClienteDo.jsp" method="post">
                        <table border="0" cellspacing="2">
                            <tr>
                                <th align="right">CPF: </th>
                                <th><input type="text" value="<%=c.getCliente().getPessoa().getCpf()%>" name="cpf" size="60"><th/>
                            </tr>
                            <tr>
                                <th align="right">Nome: </th>
                                <th><input type="text" value="<%=c.getCliente().getPessoa().getNome()%>" name="nome" size="60"><th/>
                            </tr>
                            <tr>
                                <th align="right">Telefone: </th>
                                <th><input type="text" value="<%=c.getCliente().getPessoa().getTelefone()%>" name="telefone" size="60"><th/>
                            </tr>
                            <tr>
                                <th align="right">Endereço: </th>
                                <th><input type="text" value="<%=c.getCliente().getPessoa().getEndereco()%>" name="endereco" size="60"><th/>
                            </tr>
                            <tr>
                                <th align="right">Email: </th>
                                <th><input type="text" value="<%=c.getCliente().getPessoa().getEmail()%>" name="email" size="60"><th/>
                            </tr>
                            <tr>
                                <th></th>
                                <%
                                    session.setAttribute("id", c.getCliente().getPessoa().getIdPessoa());
                                %>
                                
                                <th><input type="submit" value="Salvar" /></th>
                            </tr>
                    </form>
                </th>
            </tr>
        </table>
            
    </div><div id="footer" align="center"><%@include file="footer.jsp" %></div></div></body>
</html>
